home *** CD-ROM | disk | FTP | other *** search
/ il gioco del Kamasutra / Milo Manara Kamasutra.iso / mac / DATA / ParteIII / GameI / Spada.dir / 00036_Script_36 < prev    next >
Text File  |  1997-11-24  |  3KB  |  83 lines

  1. on mouseEnter
  2.   set the cursor of sprite 39 to [the number of cast "MouseOpen", the number of cast "MouseOpenMask"]
  3. end mouseEnte
  4.  
  5. on mouseleave
  6.   
  7.   set the visible of sprite 39 to 0
  8.   
  9. end mouseleave
  10.  
  11.  
  12. on mousedown
  13.   
  14.   global oldloc, x0, y0, x1, y1
  15.   puppetsprite 39, true
  16.   set the cursor of sprite 39 to [the number of cast "MouseClose", the number of cast "MouseCloseMask"]
  17.   set x0 = the loch of sprite 39
  18.   set y0 = the locv of sprite 39
  19.   repeat while the stilldown
  20.     set the loc of sprite 39 to point(the mouseH,the mouseV)
  21.     updatestage
  22.   end repeat
  23.   Puppetsound 3,"Click2"
  24. end mousedown
  25.  
  26. on mouseUp
  27.   global oldloc, x0, y0, x1, y1
  28.   global oldloc, DonnaTesto1, DonnaTesto2, DonnaTesto3, DonnaCard1, DonnaCard2, DonnaCard3
  29.   global Coppia1, Coppia2, Coppia3, Test1, Test2, Test3
  30.   set the cursor of sprite 39 to [the number of cast "MouseOpen", the number of cast "MouseOpenMask"]
  31.   if (Test1 = 0) and (inside(the loc of sprite 39, the rect of sprite 17 ) = 1) then
  32.     set the loc of sprite 39 to oldloc
  33.     puppetsprite 39, 0
  34.     set the membernum of sprite 24 to (the membernum of sprite 39)
  35.     set the loc of sprite 24 to point(172, 361)
  36.     set DonnaCard1 = the name of member (the membernum of sprite 39)  
  37.     set the text of member 20 to "Donna " & (the name of member (the membernum of sprite 39))
  38.     put the text of member 20 into DonnaTesto1
  39.     updatestage
  40.   else if (Test2 = 0) and (inside(the loc of sprite 39, the rect of sprite 18 ) = 1) then
  41.     set the loc of sprite 39 to oldloc
  42.     puppetsprite 39, 0
  43.     set the membernum of sprite 25 to (the membernum of sprite 39)
  44.     set the loc of sprite 25 to point(362, 361)
  45.     set DonnaCard2 = the name of member (the membernum of sprite 39)
  46.     set the text of member 21 to "Donna " & (the name of member (the membernum of sprite 39))
  47.     put the text of member 21 into DonnaTesto2
  48.     updatestage
  49.   else if (Test3 = 0) and (inside(the loc of sprite 39, the rect of sprite 19 ) = 1) then
  50.     set the loc of sprite 39 to oldloc
  51.     puppetsprite 39, 0
  52.     set the membernum of sprite 26 to (the membernum of sprite 39)
  53.     set the loc of sprite 26 to point(552, 361)
  54.     set DonnaCard3 = the name of member (the membernum of sprite 39)
  55.     set the text of member 22 to "Donna " & (the name of member (the membernum of sprite 39))
  56.     put the text of member 22 into DonnaTesto3
  57.     updatestage
  58.   else
  59.     put the loch of sprite 39 into x1
  60.     put the locv of sprite 39 into y1
  61.     set passo = integer(abs(x1-x0))
  62.     if x1 <> x0 then
  63.       if x1 > x0 then
  64.         repeat with n = 20 down to 1
  65.           set the loch of sprite 39 = (x1 - passo/n)
  66.           set the locv of sprite 39 = ((y1-y0)*(x1 - passo/n) + (x1*y0 -x0*y1))/(x1-x0)
  67.           updatestage
  68.         end repeat
  69.       else
  70.         repeat with n = 20 down to 1
  71.           set the loch of sprite 39 = (x1 + passo/n)
  72.           set the locv of sprite 39 = ((y1-y0)*(x1 + passo/n) + (x1*y0 -x0*y1))/(x1-x0)
  73.           updatestage
  74.         end repeat
  75.       end if
  76.     end if
  77.     set the loch of sprite 39 = x0
  78.     set the locv of sprite 39 = y0
  79.     updatestage
  80.   end if
  81.   
  82. end mouseUp
  83.